export interface Device {
  id: string;
  type: 'router' | 'switch' | 'server';
  name: string;
}
export interface Row {
  id: string;
  label: string;
  devices: Device[];
}
const deviceTypes: Device['type'][] = ['router', 'switch', 'server'];
export function generateRows(rowCount = 100): Row[] {
  return Array.from({ length: rowCount }, (_, r) => {
    const deviceCount = 3 + Math.floor(Math.random() * 8);
    return {
      id: `row-${r}`,
      label: `Row ${r + 1}`,
      devices: Array.from({ length: deviceCount }, (_, i) => ({
        id: `r${r}-d${i}`,
        type: deviceTypes[i % deviceTypes.length],
        name: `${deviceTypes[i % deviceTypes.length]}${i}`,
      })),
    };
  });
}